const colors = [
  "#FF5733",
  "#C70039",
  "#900C3F",
  "#581845",
  "#FFC300",
  "#FF5733",
  "#FF9800",
  "#F44336",
  "#E91E63",
  "#9C27B0",
  "#673AB7",
  "#3F51B5",
  "#2196F3",
  "#03A9F4",
  "#00BCD4",
  "#009688",
  "#4CAF50",
  "#8BC34A",
  "#CDDC39",
  "#FFEB3B",
  "#FFC107",
  "#FF9800",
  "#FF5722",
  "#795548",
  "#9E9E9E",
  "#607D8B",
  "#F06292",
  "#BA68C8",
  "#4FC3F7",
  "#4DB6AC",
  "#81C784",
  "#DCE775",
  "#FFD54F",
  "#FFB74D",
  "#A1887F",
  "#E57373",
  "#F06292",
  "#BA68C8",
  "#9575CD",
  "#7986CB",
  "#64B5F6",
  "#4FC3F7",
  "#4DD0E1",
  "#4DB6AC",
  "#81C784",
  "#AED581",
  "#DCE775",
  "#FFF176",
  "#FFD54F",
  "#FFB74D",
  "#FF8A65",
  "#A1887F",
  "#E0E0E0",
  "#90A4AE",
  "#5C6BC0",
  "#42A5F5",
  "#29B6F6",
  "#00ACC1",
  "#00897B",
  "#43A047",
  "#7CB342",
  "#C0CA33",
  "#FDD835",
  "#FFB300",
  "#FB8C00",
  "#F4511E",
  "#6D4C41",
  "#5D4037",
  "#616161",
  "#455A64",
  "#37474F",
  "#263238",
  "#D81B60",
  "#8E24AA",
  "#5E35B1",
  "#3949AB",
  "#1E88E5",
  "#039BE5",
  "#00ACC1",
  "#00897B",
  "#43A047",
  "#7CB342",
  "#C0CA33",
  "#FDD835",
  "#FFB300",
  "#FB8C00",
  "#F4511E",
  "#6D4C41",
  "#5D4037",
  "#616161",
  "#455A64",
  "#37474F",
  "#263238",
  "#EC407A",
  "#AB47BC",
  "#7E57C2",
  "#5C6BC0",
  "#42A5F5",
  "#29B6F6",
  "#00ACC1",
  "#00897B",
  "#43A047",
  "#7CB342",
  "#C0CA33",
  "#FDD835",
  "#FFB300",
  "#FB8C00",
  "#F4511E",
  "#6D4C41",
  "#5D4037",
];

/**
 * 获取一个颜色
 * @param index 任意数,也可以不写
 * @returns 返回一个颜色
 */
export function getColor(index?: number | undefined) {
  if (index===undefined) {
    //生成随机数
    index = Math.floor(Math.random() * colors.length);
  }
  return colors[index % colors.length];
}
